<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var arr = [
      [21, 32, 53, 31, 35, 43, 66],
      [42, 32, 53, 52, 86, 51, 66]
    ]
    //合并成一维数组
    var num = arr[0].concat(arr[1])
    function removeDuplicate(num) {
    var newArr = []
    num.forEach(item => {
      if (!newArr.includes(item)) {
        //两个同样的值只有一个true
        newArr.push(item)
      }
    })
    return newArr
  }
  var result = removeDuplicate(num)
  console.log(result) 
  </script>
</body>
</html>